#include<bits/stdc++.h>
using namespace std;
#define N 100005
int a[N],x,n,ans,r;
inline int read()
{
    int x=0;char ch;
    ch=getchar();
    while(ch>'9'||ch<'0') ch=getchar();
    while(ch>='0'&&ch<='9')
    {
        x=(x<<1)+(x<<3)+(ch^48);
        ch=getchar();
    }
    return x;
}
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    n=read();
    for(int i=1;i<=n;i++)
    {
        x=read();a[x]++;
        r=max(r,x);
    }
    /*for(int i=1;i<=n;i++)
        cout<<a[i]<<endl;*/
    for(int i=1;i<=r;i++)
    {
        if(a[i]&&!ans)
            ans=a[i];
        else if(a[i])
             {
                 if(ans>a[i]) ans=ans;
                 else ans=2*a[i]-ans;
             }
    }
    printf("%d\n",ans);
    return 0;
}
